package com.sbw.springcloud.consumer.feign.demo.hystric;

import com.sbw.springcloud.consumer.feign.demo.service.FeignService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @Author: sangbowei
 * @Description: 断路器
 * @Date: Created in  14:58 2018\1\4 0004
 **/
@Component
public class FeignServiceHystric implements FeignService{

    Logger logger = LoggerFactory.getLogger(FeignServiceHystric.class);

    @Override
    public String feignDiscoveryClient() {
        logger.info("feignDiscoveryClient Fallback start");
        return "Sorry , this is feignDiscoveryClient method default value! ";
    }

    @Override
    public String feignHello() {
        logger.info("feignHello Fallback start");
        return "Sorry , this is feignHello method default value! ";
    }

    @Override
    public String feignHelloDelay() {
        logger.info("feignHelloDelay Fallback start");
        return "Sorry , this is feignHelloDelay method default value! ";
    }

    @Override
    public String feignHelloParams(String name) {
        logger.info("feignHelloParams Fallback start");
        return "Sorry , this is feignHelloParams method default value! name is "+name;
    }

    @Override
    public String feignHelloClient() {
        logger.info("feignHelloClient Fallback start");
        return "Sorry , this is feignHelloClient method default value! ";
    }
}
